﻿using System;
using Common;
using Data.Contracts;

namespace Data.Common
{
    internal class BaseModel : INPC, IModel
    {
        #region fields

        private Guid _id;
        private string _name;
        private string _description;

        #endregion

        #region properties

        public Guid Id
        {
            get { return _id; }
            internal set
            {
                _id = value;
                NotifyPropertyChanged(() => Id);
            }
        }

        public string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                NotifyPropertyChanged(() => Name);
            }
        }

        public string Description
        {
            get { return _description; }
            set
            {
                _description = value;
                NotifyPropertyChanged(() => Description);
            }
        }

        #endregion

        #region ctor

        public BaseModel(Guid id)
        {
            _id = id;
        }

        #endregion
    }
}
